package gv.project 
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;

	/**
	 * @author rick
	 */
	public class Tool extends MovieClip 
	{
		private var dot : Sprite;
		public var toolTip : ToolTip;
		public var color : uint;

		public function Tool(color:uint)
		{
			this.color = color;
			addEventListener(Event.ADDED_TO_STAGE, onStageAdd);	
		}
		
		private function onStageAdd(event : Event) : void
		{
			removeEventListener(Event.ADDED_TO_STAGE, onStageAdd);
			init();
		}
		
		private function init() : void
		{
			dot = new Sprite();
			dot.graphics.beginFill(color);
			addChild(dot);
			dot.graphics.drawCircle(0, 0, 25);
			dot.graphics.endFill();
		}
	}
}
